package com.sxbbc.common.core.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 系统参数枚举类
 *
 * `key`为系统定义参数，必须与`info_param`表的`kcode`对应
 * `remark`为该参数对应的用途解释，必须与`info_param`表的`remark`对应
 *
 * 该两项参数以每个版本用途为准，Java中以该枚举类的key进行取值
 * 故`info_param`表中，请勿改动`kcode`的内容，依照此规则新增即可
 *
 * @author leehao
 * @date 2019-07-27
 */
public enum ParamEnums {

	BUSINESS_SCALE("businessScale", "商家抽成比例"), //使用
	EFFECTIVE_VALUE("effectiveValue", "有效会员分值"),//使用
	BUSINESS_MONEY_TO_DONATE("businessMoneyToDonate","商家抽成金额转贡献值比例"),  //X
	ACCOUNT_AUTO_FREEZE("accountAutoFreeze", "交易账户冻结自动解冻天数"),
	DIRECT_PUSH_CONSUME("directPushConsume", "消费直推"),
	INDIRECT_PUSH_CONSUME("indirectPushConsume", "消费间推"),
	DIRECT_PUSH_SALE("directPushSale", "销售直推"),
	INDIRECT_PUSH_SALE("indirectPushSale", "销售间推"),
	AGENT_PROV("agentProv","省级代理收益比例"),
	AGENT_CITY("agentCity","市级代理收益比例"),
	AGENT_AREA("agentArea","县级代理收益比例"),
	CUSTOMER_SINGLEPAYAMOUNT("customerSinglePayAmount","个人单笔收款限额"),//X
	BUSSINESS_SINGLEPAYAMOUNT("bussinessSinglePayAmount","商家单笔收款限额"),//X
	BUSSINESS_PAYAMOUNTBYMONTH("bussinessPayAmountByMonth","商家每月累计收款限额"),//X
	CUSTOMER_CASHAUTOTOACCOUNT("customerCashAutoToAccount","用户提现金额上限金额"), //X
	CUSTOMER_CASHTOACCOUNTBYDAY("cashToAccountByDay","用户每天累计提现上限金额"),   //使用







	//以上为旧系统参数配置，以下为【金种农牧】系统参数配置


	ONLINE_AGENT_PROV("onlineAgentProv","线上省级代理收益比例"),//使用
	ONLINE_AGENT_CITY("onlineAgentCity","线上市级代理收益比例"),//使用
	ONLINE_AGENT_AREA("onlineAgentArea","线上区级代理收益比例"),//使用

	OFFLINE_AGENT_PROV("offlineAgentProv","线下省级代理收益比例"),//使用
	OFFLINE_AGENT_CITY("offlineAgentCity","线下市级代理收益比例"),//使用
	OFFLINE_AGENT_AREA("offlineAgentArea","线下区级代理收益比例"),//使用

	ONLINE_DIRECT_PUSH("onlineDirectPush", "线上订单直推"),  //使用
	ONLINE_INDIRECT_PUSH("onlineIndirectPush", "线上订单间推"), //使用

	OFFLINE_DIRECT_PUSH("offlineDirectPush", "线下消费直推"),  //使用
	OFFLINE_INDIRECT_PUSH("offlineIndirectPush", "线下消费间推"), //使用

	RECOMMEND_MERCHANT("recommendMerchant", "推荐商家奖励"), //使用

	GENERATE_CHICKEN_COUPON("generateChickenCoupon", "平台挂售订单，每代卖x只鸡发放一只提鸡券"), //使用

	TEAM_SMALL_REWARD("teamSmallReward", "小型养殖户伞下会员自营商城消费金额奖励"), //使用 团队奖小型养殖户奖励
	TEAM_LARGE_REWARD("teamLargeReward", "大型养殖户伞下会员自营商城消费金额奖励"), //使用 团队奖小型养殖户奖励
	SMALL_EQUAL_REWARD("smallEqualReward", "小型养殖户同级会员业务提成奖励"),//使用
	LARGE_EQUAL_REWARD1("largeEqualReward", "大型养殖户同级会员业务提成奖励"),//使用

	FARM_SCAL("farmScal", "农场挂售平台抽成比例"),//使用
	FARM_BONUS("farmBonus", "代卖鸡苗每只抽出X元"),//使用
	FARM_BONUS_DIRECT_PUSH("farmBonusDirectPush", "代卖鸡苗每只抽出X元的Y给直推"), //使用
	FARM_BONUS_INDIRECT_PUSH("farmBonusIndirectPush", "代卖鸡苗每只抽出X元的Y给间推"); //使用
	private String key;

	private String remark;

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	ParamEnums(String key, String remark) {
		this.key = key;
		this.remark = remark;
	}

	public static ParamEnums getEnums(String key){
		for (ParamEnums p : ParamEnums.values()) {
			if (StringUtils.equals(key,p.getKey())) {
				return p;
			}
		}
		return null;
	}
}
